package com.example.sql.visitor;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.druid.sql.ast.statement.SQLExprTableSource;
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitorAdapter;


public class TestVisitor extends OracleASTVisitorAdapter {
    private final List<String> tableNameList = new ArrayList<>();

    @Override
    public boolean visit(SQLExprTableSource x) {
        tableNameList.add(x.getName().getSimpleName());
        return super.visit(x);
    }

    public List<String> getTableNameList() {
        return tableNameList;
    }

    
}
